#include "OracleSegmentAttributesImpl.h"

SQLName_ptr OracleSegmentAttributesImpl::getTablespace()
{
  return tablespace;
}

void OracleSegmentAttributesImpl::setTablespace(SQLName_ptr x)
{
  if (x != nullptr)
  {
    x->setParent(SharedObject(OracleSegmentAttributesImpl));
  }
  this->tablespace = x;
}

BOOL_ptr OracleSegmentAttributesImpl::getCompress()
{
  return compress;
}

void OracleSegmentAttributesImpl::setCompress(BOOL_ptr compress)
{
  this->compress = compress;
}

int OracleSegmentAttributesImpl::getCompressLevel()
{
  return compressLevel;
}

void OracleSegmentAttributesImpl::setCompressLevel(int compressLevel)
{
  this->compressLevel = compressLevel;
}

int OracleSegmentAttributesImpl::getPctthreshold()
{
  return pctthreshold;
}

void OracleSegmentAttributesImpl::setPctthreshold(int pctthreshold)
{
  this->pctthreshold = pctthreshold;
}

int OracleSegmentAttributesImpl::getPctfree()
{
  return pctfree;
}

void OracleSegmentAttributesImpl::setPctfree(int ptcfree)
{
  this->pctfree = ptcfree;
}

int OracleSegmentAttributesImpl::getPctused()
{
  return pctused;
}

void OracleSegmentAttributesImpl::setPctused(int ptcused)
{
  this->pctused = ptcused;
}

int OracleSegmentAttributesImpl::getInitrans()
{
  return initrans;
}

void OracleSegmentAttributesImpl::setInitrans(int initrans)
{
  this->initrans = initrans;
}

int OracleSegmentAttributesImpl::getMaxtrans()
{
  return maxtrans;
}

void OracleSegmentAttributesImpl::setMaxtrans(int maxtrans)
{
  this->maxtrans = maxtrans;
}

int OracleSegmentAttributesImpl::getPctincrease()
{
  return pctincrease;
}

void OracleSegmentAttributesImpl::setPctincrease(int pctincrease)
{
  this->pctincrease = pctincrease;
}

int OracleSegmentAttributesImpl::getFreeLists()
{
  return freeLists;
}

void OracleSegmentAttributesImpl::setFreeLists(int freeLists)
{
  this->freeLists = freeLists;
}

BOOL_ptr OracleSegmentAttributesImpl::getLogging()
{
  return logging;
}

void OracleSegmentAttributesImpl::setLogging(BOOL_ptr logging)
{
  this->logging = logging;
}

SQLObject_ptr OracleSegmentAttributesImpl::getStorage()
{
  return storage;
}

void OracleSegmentAttributesImpl::setStorage(SQLObject_ptr storage)
{
  this->storage = storage;
}

BOOL_ptr OracleSegmentAttributesImpl::isCompressForOltp()
{
  return compressForOltp;
}

void OracleSegmentAttributesImpl::setCompressForOltp(BOOL_ptr compressForOltp)
{
  this->compressForOltp = compressForOltp;
}

void OracleSegmentAttributesImpl::cloneTo(OracleSegmentAttributesImpl_ptr x)
{
  x->pctfree = pctfree;
  x->pctused = pctused;
  x->initrans = initrans;

  x->maxtrans = maxtrans;
  x->pctincrease = pctincrease;
  x->freeLists = freeLists;
  x->compress = compress;
  x->compressLevel = compressLevel;
  x->compressForOltp = compressForOltp;
  x->pctthreshold = pctthreshold;

  x->logging = logging;

  if (tablespace != nullptr)
  {
    x->setTablespace(std::dynamic_pointer_cast<SQLName>(tablespace->clone()));
  }

  if (storage != nullptr)
  {
    x->setStorage(storage->clone());
  }
}
